package com.zb.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zb.entity.AccounLoginInfo;
import com.zb.entity.ZjWorkSpareMaterial;
import com.zb.extend.WorkSpareMaterialExtend;
import com.zb.vo.WorkSpareDetailMaterialVo;
import com.zb.vo.WorkSpareMaterialCheckVo;
import com.zb.vo.WorkSpareMaterialVo;
import com.zb.vo.WorkTotalFeeVo;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 工单备件物料表 服务类
 * </p>
 *
 * @author WEN
 * @since 2023-10-26
 */
public interface ZjWorkSpareMaterialService extends IService<ZjWorkSpareMaterial> {

    /**
     * 新增、修改、删除工单备件
     * @param custAccId 商家ID
     * @param workId 工单ID
     * @param workSpareId 工单备件表ID
     * @param spareMaterialVos 工单备件物料
     * @param ids 删除的工单备件物料ID
     */
    void save(Long custAccId, Long workId, Long workSpareId, List<WorkSpareMaterialVo> spareMaterialVos, List<Long> ids);

    /**
     * 根据工单备件ID获取备件物料
     * @param workSpareIds 工单备件ID
     * @return
     */
    List<ZjWorkSpareMaterial> getByWorkSpareIds(List<Long> workSpareIds);

    /**
     * 根据备件ID获取关联工单物料的备件
     * @param spareIds 备件ID
     * @return
     */
    List<ZjWorkSpareMaterial> getRelationBySpareIds(List<Long> spareIds);

    /**
     * 根据备件ID获取关联工单物料的备件
     * @param spareId 备件ID
     * @return
     */
    List<ZjWorkSpareMaterial> getRelationBySpareId(Long spareId);

    /**
     * 根据仓库ID查询关联工单备件的仓库ID
     * @param storeIds 仓库ID
     * @return
     */
    List<Long> getRelationByStoreIds(List<Long> storeIds);

    /**
     * 根据删除的配件规格ID获取关联工单物料配件的规格ID
     * @param delSepcIds 删除的配件规格ID
     * @return
     */
    List<Long> getSpecIdsByDelSpecId(List<Long> delSepcIds);

    /**
     * 根据工单ID获取工单申请配件导出字段数据
     * @param workIds 工单ID
     */
    List<WorkSpareMaterialExtend> getOrderSpareExportFieldByWorkIds(List<Long> workIds);

    /**
     * 根据工单ID获取审核通过的配件费用
     * @param workId 工单ID
     * @return
     */
    ZjWorkSpareMaterial getOrderSettlementFeeByWorkId(Long workId);

    /**
     * 根据工单ID获取工单结算费用
     * @param workIds 工单ID
     * @return
     */
    List<ZjWorkSpareMaterial> getOrderSettlementFeeByWorkId(List<Long> workIds);

    /**
     * 根据工单ID获取工单配件费用
     * @param workId 工单ID
     * @return
     */
    List<WorkSpareMaterialExtend> getByWorkId(Long workId);


}
